package service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import entity.Question;
import mapper.QuestionMapper;

@Service
public class QuestionService {
	@Resource
	QuestionMapper questionMapper;

	public QuestionMapper getQuestionMapper() {
		return questionMapper;
	}

	public void setQuestionMapper(QuestionMapper questionMapper) {
		this.questionMapper = questionMapper;
	}
	
	public boolean newQuestion(Question question) {
		return questionMapper.newQuestion(question);
	}
	
	public boolean deleteQuestionById(Question question) {
		return questionMapper.deleteQuestionById(question);
	}
	
	public List<Question> findQuestionBySurveyId(Question question){
		return questionMapper.findQuestionBySurveyId(question);
	}
	
	public Question findQuestionByQuestionId(Question question) {
		return questionMapper.findQuestionByQuestionId(question);
	}
	
	public boolean updateQuestionByQuestionId(Question question) {
		return questionMapper.updateQuestionByQuestionId(question);
	}
}
